import { createRouter, createWebHistory } from 'vue-router';
import Home from '../views/Home.vue';
import RestaurantDetail from '../views/RestaurantDetail.vue';
import UserInfo from '../views/UserInfo.vue';

// 定义路由
const routes = [
    { path: '/Home', component: Home, name: 'Home' },
    { path: '/Restaurants', component: RestaurantDetail, name: 'RestaurantDetail' },
    { path: '/User', component: UserInfo, name: 'UserInfo' }
];

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes
});

export default router;